/*eslint-disable */
// import ajax from '@/utils/request.js'
import { ajax } from '@/plugins/request.js'

export const getYourFeedArticle = (params) => {
  return ajax.get(`/api/articles/feed`, {
    params
  })
}
export const getArticle = (slug) => {
  return ajax.get(`/api/articles/${slug}`)
}

export const getComments = (slug) => {
  return ajax.get(`/api/articles/${slug}/comments`)
}
/**
 *
 * @param {string} slug
 * @description 添加评论
 */
export const addComments = (slug, comment) => {
  return ajax.post(`/api/articles/${slug}/comments`, {
    comment
  })
}
